package org.jeecg.common.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * @author guoyh
 * @ClassName BusinessEnum
 * @Description
 * @since 2020/8/10 23:57
 **/
@Getter
@AllArgsConstructor
public enum BusinessTypeEnum {

    DOCTOR(0, "医生"),
    ASSISTANT(1, "助理"),
    PATIENT(2, "患者"),
    ;

    private Integer id;

    private String desc;

    public static BusinessTypeEnum getInstance(int id){
        return Arrays.stream(values()).filter(item -> Objects.equals(id,item.getId())).findFirst().orElse(null);
    }


}
